<#assign base=request.contextPath>
<title><#if title?exists && title?length gt 0> ${title}<#else>${configs["systemName"]}</#if> </title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- basic styles -->
<link href="${base}/resources/3rdlib/ace/css/font-awesome.min.css" rel="stylesheet"/>
<link href="${base}/resources/3rdlib/fonts/fontawesome/css/font-awesome.min.css" rel="stylesheet"/>
<link href="${base}/resources/3rdlib/fonts/alifont/iconfont.css" rel="stylesheet"/>
<!--[if IE 7]>
  <link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/font-awesome-ie7.min.css" />
<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="${base}/resources/3rdlib/ace/css/bootstrap-ie6.css">
<![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="${base}/resources/3rdlib/ace/css/ie.css">
<![endif]-->


<!-- ace styles -->

<link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/bootstrap.min.css" />
<link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/ace.min.css" />
<link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/ace-rtl.min.css" />
<link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/ace-skins.min.css" />
<link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/ace-extend.css" />
<link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/colorpicker.css" />
<link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/chosen.css" />
<link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/datepicker.css" />
<!--css libs--->
<link rel="stylesheet" href="${base}/resources/css/admin.css" />

<!--[if lte IE 8]>
  <link rel="stylesheet" href="${base}/resources/3rdlib/ace/css/ace-ie.min.css" />
<![endif]-->

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

<!--[if lt IE 9]>
<script src="${base}/resources/3rdlib/ace/js/html5shiv.js"></script>
<script src="${base}/resources/3rdlib/ace/js/respond.min.js"></script>
<![endif]-->

<!-- basic scripts -->

<!--[if !IE]> -->

<script type="text/javascript">
	window.jQuery || document.write("<script src='${base}/resources/3rdlib/ace/js/jquery-2.0.3.min.js'>"+"<"+"script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='${base}/resources/3rdlib/ace/js/jquery-1.10.2.min.js'>"+"<"+"script>");
</script>
<![endif]-->

<script src="${base}/resources/3rdlib/ace/js/ace-extra.min.js"></script>

<script type="text/javascript">
	if("ontouchend" in document) document.write("<script src='${base}/resources/3rdlib/ace/js/jquery.mobile.custom.min.js'>"+"<"+"script>");
</script>

<!-- page specific plugin scripts -->

<!--[if lte IE 8]>
  <script src="${base}/resources/3rdlib/ace/js/excanvas.min.js"></script>
<![endif]-->
<!--[if lte IE 6]>
  <script type="text/javascript" src="${base}/resources/3rdlib/ace/js/bootstrap-ie.js"></script>
<![endif]-->

<script src="${base}/resources/3rdlib/ace/js/jquery-ui-1.10.3.custom.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/jquery.ui.touch-punch.min.js"></script>

<!-- bootstrap -->
<script src="${base}/resources/3rdlib/ace/js/bootstrap.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/jquery.validate.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/typeahead-bs2.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/chosen.jquery.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/fuelux/fuelux.spinner.min.js"></script>

<!-- ace scripts -->

<script src="${base}/resources/3rdlib/ace/js/ace-elements.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/ace.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/bootbox.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/bootstrap-tag.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/bootstrap-colorpicker.min.js"></script>
<script src="${base}/resources/3rdlib/ace/js/date-time/bootstrap-datepicker.cn.js"></script>	

<!-- lib js-->
<script src="${base}/resources/3rdlib/echarts/echarts.min.js"></script>
<script src="${base}/resources/3rdlib/layer/pc/layer.js"></script>
<!--system js-->
<script src="${base}/resources/js/ajaxfileupload.js"></script>
<script src="${base}/resources/js/jquery.tools.js"></script>
<script src="${base}/resources/js/jquery.form.js"></script>

<script type="text/javascript">
<!-- 
$(function(){
	<#if result?exists>
		<#if result.status == 'ERROR' && result.message?is_string>
			<#if result.jumpUrl?exists && result.jumpUrl?length gt 0 >
			layer.alert('${result.message}',{skin:'layui-layer-lan',closeBtn:0},function(){window.location.href='${result.jumpUrl}';});
			<#else>
			layer.alert('${result.message}',{skin:'layui-layer-lan',closeBtn:0});
			</#if>
		</#if>
		<#if result.status == 'OK' && result.message?is_string && result.message?length gt 0>
			<#if result.jumpUrl?exists && result.jumpUrl?length gt 0 >
			layer.alert('${result.message}',{skin:'layui-layer-lan',closeBtn:0},function(){window.location.href='${result.jumpUrl}';});
			<#else>
			layer.alert('${result.message}',{skin:'layui-layer-lan',closeBtn:0});
			</#if>
		</#if>
		//bootbox.alert('${result.message}');
	</#if>
});
//-->
</script>
<script type="text/javascript">
$(function(){
	//设置弹窗的属性
	bootbox.setDefaults({locale:'zh_CN'});
});
//文件属性配置
var imageParms = {
	no_file:'请选择图片',
	btn_choose:'选择',
	btn_change:'重选',
	droppable:false,
	onchange:function(){},
	thumbnail:true,
	whitelist:'.gif|.png|.jpg|.jpeg',
	icon_remove:'fa fa-times',
	no_icon:'fa fa-upload'
};
var videoParms = {
	no_file:'请选择视频',
	btn_choose:'选择',
	btn_change:'重选',
	droppable:false,
	onchange:function(){},
	thumbnail:true,
	whitelist:'.mp4|.flv',
	icon_remove:'fa fa-times',
	no_icon:'fa fa-upload'
};
var excelParms = {
	no_file:'请选择excel文件',
	btn_choose:'选择',
	btn_change:'重选',
	droppable:false,
	onchange:function(){},
	thumbnail:true,
	whitelist:'.xls|.xlsx',
	icon_remove:'fa fa-times',
	no_icon:'fa fa-upload'
};
var appParms = {
	no_file:'请选择App文件',
	btn_choose:'选择',
	btn_change:'重选',
	droppable:false,
	onchange:function(){},
	thumbnail:true,
	whitelist:'.apk|.ipa',
	icon_remove:'fa fa-times',
	no_icon:'fa fa-upload'
};

function changePage(url){
	location.href = url;
}

function formatDate(timespan){
	return new Date(timespan).format('yyyy-MM-dd hh:mm:ss');
}


function formatDateWithFormat(timespan,format){
	return new Date(timespan).format(format);
}

/**
 * layer 弹层
 * layer.js
 */
var layerIndex = 0;
/**
 * 弹出加载对话框
 */
function openLoading(){
	layerIndex = layer.open({type: 2, shadeClose:false});
	return layerIndex;
}
/**
 * 关闭加载对话框
 */
function closeLoading(index){
	layer.close(index);
}

function closeLoading(){
	layer.close(layerIndex);
}


/**
 * 2秒自动关闭提示框
 * @param content 提示内容
 */
function layerAlert(content){
	//提示框
	layer.open({
	    content: content,
	    time: 4 //4秒后自动关闭
	});
}
</script>


